﻿//-------------------------------------------------------------------------------------------
// <copyright file="IRippleProvider.cs" company="Russell Wilkins">
//     Copyright (c) Russell Wilkins 2014. All Rights Reserved.
// </copyright>
// <author>Russell Wilkins</author>
// <license href="license.txt">
//     The use of this software is governed by the Microsoft Public License
//     which is included with this distribution.
// </license>
//-------------------------------------------------------------------------------------------
namespace Ripple.Providers
{
    /// <summary>
    /// Interface for calling all rippled network methods.
    /// </summary>
    public interface IRippleProvider
    {
        /// <summary>
        /// Call the ripple account_info method.
        /// See <a href="https://ripple.com/build/rippled-apis/#account_info">documenation</a>
        /// </summary>
        /// <param name="accountId">Id of account to retrieve.</param>
        /// <returns>Result of the method call.</returns>
        AccountInfoResult AccountInfo(string accountId, string ledger_index);

        /// <summary>
        /// Call the ripple account_lines method.
        /// See <a href="https://ripple.com/build/rippled-apis/#account_lines">documenation</a>
        /// </summary>
        /// <param name="accountId"></param>
        /// <param name="peerAccountId"></param>
        /// <param name="marker"></param>
        /// <returns>Result of the method call.</returns>
        AccountLinesResult AccountLines(string accountId, string ledger_index, string peerAccountId = null, object marker = null);

        /// <summary>
        /// Call the ripple account_offers method.
        /// See <a href="https://ripple.com/build/rippled-apis/#account_offers">documenation</a>
        /// </summary>
        /// <param name="accountId"></param>
        /// <param name="marker"></param>
        /// <returns>Result of the method call.</returns>
        AccountOffersResult AccountOffers(string accountId, string ledger_index, object marker = null);

        /// <summary>
        /// Call the ripple account_tx method.
        /// See <a href="https://ripple.com/build/rippled-apis/#account_tx">documenation</a>
        /// </summary>
        /// <param name="accountId">Id of account to retrieve.</param>
        /// <returns>Result of the method call.</returns>
        AccountTransactionsResult AccountTransactions(string accountId, int ledgerIndexMin = -1, int ledgerIndexMax = -1, object marker = null);

        /// <summary>
        /// Call the ripple ping method.
        /// See <a href="https://ripple.com/build/rippled-apis/#ping">ping</a>
        /// </summary>
        /// <returns>Result of the method call.</returns>
        PingResult Ping();

        /// <summary>
        /// Call the ripple random method.
        /// See <a href="https://ripple.com/build/rippled-apis/#random">random</a>
        /// </summary>
        /// <returns>Result of the method call.</returns>
        RandomResult Random();

        /// <summary>
        /// Call the ripple server_info method.
        /// See <a href="https://ripple.com/build/rippled-apis/#server_info">server_info</a>
        /// </summary>
        /// <returns>Result of the method call.</returns>
        ServerInfoResult ServerInfo();

        /// <summary>
        /// Call the ripple server_state method.
        /// See <a href="https://ripple.com/build/rippled-apis/#server_state">server_state</a>
        /// </summary>
        /// <returns>Result of the method call.</returns>
        ServerStateResult ServerState();
    }
}